import React, { useState } from 'react';
import { Modal, Form } from 'antd';

const FunctionForm: React.FC = () => {
  const [isModalVisible, setIsModalVisible] = useState(false);
  const [editingFunction, setEditingFunction] = useState(null);
  const [form] = Form.useForm();

  const handleSubmit = (values) => {

    
  };

  return (
    <Modal
      title={editingFunction ? '编辑函数' : '新建函数'}
      open={isModalVisible}
      onCancel={() => setIsModalVisible(false)}
      footer={null}
      width={800}
      style={{ maxHeight: '80vh' }}
      bodyStyle={{ 
        maxHeight: 'calc(80vh - 108px)', 
        overflowY: 'auto',
        padding: '24px'
      }}
    >
      <Form
        form={form}
        layout="vertical"
        initialValues={editingFunction}
        onFinish={handleSubmit}
        style={{ maxHeight: '100%', overflow: 'hidden' }}
      >
        {/* Form fields go here */}
      </Form>
    </Modal>
  );
};

export default FunctionForm; 